package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 24-Mar-2009
 * Time: 18:35:15
 * To change this template use File | Settings | File Templates.
 */
public interface TauxConversionService extends RemoteService {
  TauxConversionInfos RetournerTaux (Date d, MonnaieInfos monnaie_initiale, MonnaieInfos monnaie_finale
  ) throws MonException;

  /**
   * Utility/Convenience class.
   * Use TauxConversionService.App.getInstance() to access static instance of TauxConversionServiceAsync
   */
  public static class App {
    private static final TauxConversionServiceAsync ourInstance;

    static {
      ourInstance = (TauxConversionServiceAsync) GWT.create(TauxConversionService.class);
      ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "/TauxConversionService");
    }

    public static TauxConversionServiceAsync getInstance() {
      return ourInstance;
    }
  }
}
